<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="../js/jquery-1.6.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="../css/logonmenu.css"/>
<link rel="stylesheet" type="text/css" href="../css/logonIndex.css"/>

<script type="text/javascript">
var list;
$(document).ready( function(){
		$.ajax({
		method : "GET",
		url : "../ajaxQuery.do",
		data : "isexpired=true",
		success : callback
	});
});

function callback(data) {
	list = data;
	$("#projectstatus").text(list[0].status);
	if(list[0].status == "Project is now working.") {
		$("#description").text("프로그램 설명:"+list[0].description);
		$("#daynum").text(list[0].daynum+"일째");
		$("#initweight").text("초기 몸무게:"+list[0].initweight);
		$("#destweight").text("목표 몸무게:"+list[0].destweight);
	}
	for(var i = 1 ; i < list.length; i++) {
		$k = $("<div></div>");
		$t = $("<div></div>").text(+list[i].day+"번째 날");
		$p = $("<div></div>").text("몸무게:"+list[i].todayweight);
		$k.append($t).append($p);
		$("#list").append($k);
	}
}
</script>
</head>
<body>
<div id="set">
	<jsp:include page="logonmenu.jsp"></jsp:include>
	<div id="line">
	<div id="status">
		<div id="projectstatus"></div>
		<div id="description"></div>
		<div id="daynum"></div>
		<div id="destweight"></div>
		<div id="initweight"></div>
	</div>
	<div id="list">
	</div>
	<div id="logo">
	<img src="../gogologo.png" width=200, height=200>
	</div>
	</div>
	</div>
</body>
</html>